<%@page pageEncoding="utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<base href="<%=request.getContextPath()%>/">
		<link href="about/css/bootstrap.min.css" type="text/css" rel="stylesheet">
		<link href="about/css/myCss.css" type="text/css" rel="stylesheet">
		<link href="about/css/main.css" type="text/css" rel="stylesheet">
		<link href="about/css/base.css" type="text/css" rel="stylesheet">
		<!--按钮样式表-->
		<link href="about/css/btn.css" type="text/css" rel="stylesheet">
		<link href="about/css/css.css" type="text/css" rel="stylesheet">
		<link href="about/css/index.css" type="text/css" rel="stylesheet">
		<link href="about/css/search.css" type="text/css" rel="stylesheet">

		<script src="about/js/jquery.min.js"></script>
		<script src="about/js/common.js"></script>
		<script src="about/js/easing.js"></script>
		<script src="about/js/bootstrap.min.js"></script>
		<script src="about/js/jQuery.rTabs.js"></script>	
		<!-- 日历 -->
		<script src="about/codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" href="about/codebase/dhtmlxscheduler.css" type="text/css" charset="utf-8">
		<script src="about/codebase/locale/locale_cn.js" type="text/javascript" charset="utf-8"></script>
		<title>护理档案信息</title>
		<style>
			/* 健康档案 */
			.width_tab{
				width:80%;
			}.width_tabl{
				width:100px;
			}
			/* 基本信息 */
			.width_jbxx{
				width:150px;
			}
			/* 添加体检信息 */
			.width_tjtjxx_l{
				text-align: right;
			}
			.width_tjtjxx_r{
				width:100px;
			}
			/* 健康指导 */
			.textType_jkzd{
				text-align: center;
			}.imgType_jkzd{
				width:100%;
			}
			.mt205{
				margin-top: 205px;
			}
			.contentType_jkzd{
				width:410px;color:mediumvioletred;
				font-size:15px;
			}
			.totalType_jkzd{
				color:blueviolet;
				font-size:20px;
			}
			/* #t1{
				font-size:12px;
				text-align:center;
			} */
		</style>
		<script>
			
			function addLevel(){
				$("#nurtype").val($("#levelSelect option:selected").text());
			}
			
			function values(){
				$hash = location.hash.substr(1);
				$("#customerId").val($hash);
				var url="/api/nurfile/selectlevel";
				$.post(url,{},function(r){
					paitNurContent(r.data.rows);
				});
				
				
				
			}
			
			var paitNurContent=function(data){
				var html="";
				for(var i=0;i<data.length;i++){
					html+="<option value="+data[i].id+">"+data[i].levelName+"</option>";
				}
				$("#levelSelect").html(html);
			}
		</script>
	</head>
	<body>
		
		<div class="tab-pane  width_tab" id="hlda">
				<button type="button" class="btn btn-primary open_hlda_add" data-toggle="modal" data-target=".myModal2"><span class="glyphicon glyphicon-plus" onclick='values()'>添加</button>
				<table class="table mt5" id="t1">
					<thead>
						<tr style="background-color: lightgray;">
							<th>序号</th>
							<th>护理类型</th>
							<th style="width:300px">护理内容</th>
							<th>护理开始日期</th>
							<th>护理结束日期</th>
							<th>护理人员</th>
							<th>录入人</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${data}" var="r" varStatus="vs">
						<tr>
							<td>${vs.count}</td>
							<td>
							<button class="btn-xs btn-one-hl" disabled="disabled">${r.nurType}</button></td>
							<td >
								${r.nurContent}
							</td>
							<td ><fmt:formatDate value="${r.startDate}" pattern="yyyy年MM月dd日" /></td>
							<td><fmt:formatDate value="${r.endDate}" pattern="yyyy年MM月dd日" /></td>
							<td>${r.nurBy}</td>
							<td>${r.updateBy}</td>
						</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
		<form action="/beadhouse/api/nurfile/add" method="post">
		<input type="hidden" name="customerId" value="" id="customerId">
		<input type="hidden" name="nurType" value="" id="nurtype">
		<div class="modal fade myModal2" id="hlda_add" tabindex="-1" role="dialog" aria-labelledby="myHeadLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content" style="width:100%;">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<span class="glyphicon glyphicon-pencil"></span>&nbsp;【添加护理档案信息】
				</div>
				<div class="modal-body clearfix" style="height: auto;">
					<div class="col-md-12 pd0">
						<div class="col-md-1 pd0 mt10"></div>
						<div class="col-md-10 pd0">
							<div class="col-md-12 pd0">
								<div class="input-group inputWidth">
									<span class="input-group-addon titleWidth">&nbsp;&nbsp;护理类型：</span>
									<select class="form-control" name="levelId" id="levelSelect">
												
									</select>
								</div>
							</div>
						</div>
						<div class="col-md-1 pd0"></div>
					</div>
					<div class="col-md-12 pd0 mt10">
						<div class="col-md-1 pd0"></div>
						<div class="col-md-10 pd0">
							<div class="col-md-12 pd0">
								<div class="input-group inputWidth">
									<span class="input-group-addon titleWidth">&nbsp;&nbsp;护理内容：</span>
									<input type="text" name="nurContent" id="csmc" class="form-control" placeholder="请输入【护理内容】信息" aria-describedby="basic-addon1">
								</div>
							</div>
						</div>
						<div class="col-md-1 pd0"></div>
					</div>
					<div class="col-md-12 pd0 mt10">
						<div class="col-md-1 pd0"></div>
						<div class="col-md-10 pd0">
							<div class="col-md-12 pd0">
								<div class="input-group inputWidth">
									<span class="input-group-addon titleWidth">&nbsp;&nbsp;护理开始日期：</span>
									<input type="date" name="startDate" id="csmc" class="form-control" placeholder="请输入【护理开始日期】信息" aria-describedby="basic-addon1">
								</div>
							</div>
						</div>
						<div class="col-md-1 pd0"></div>
					</div>
					<div class="col-md-12 pd0 mt10">
						<div class="col-md-1 pd0"></div>
						<div class="col-md-10 pd0">
							<div class="col-md-12 pd0">
								<div class="input-group inputWidth">
									<span class="input-group-addon titleWidth">&nbsp;&nbsp;护理结束日期：</span>
									<input type="date" name="endDate" id="csmc" class="form-control" placeholder="请输入【护理结束日期】信息" aria-describedby="basic-addon1">
								</div>
							</div>
						</div>
						<div class="col-md-1 pd0"></div>
					</div>
					<div class="col-md-12 pd0 mt10">
						<div class="col-md-1 pd0"></div>
						<div class="col-md-10 pd0">
							<div class="col-md-12 pd0">
								<div class="input-group inputWidth">
									<span class="input-group-addon titleWidth">&nbsp;&nbsp;护理人员：</span>
									<input type="text" name="nurBy" id="csmc" class="form-control" placeholder="请输入【护理人员】信息" aria-describedby="basic-addon1">
								</div>
							</div>
						</div>
						<div class="col-md-1 pd0"></div>
					</div>
					<div class="col-md-12 pd0 mt10">
						<div class="col-md-1 pd0"></div>
						<div class="col-md-10 pd0">
							<div class="col-md-12 pd0">
								<div class="input-group inputWidth">
									<span class="input-group-addon titleWidth">&nbsp;&nbsp;录入人：</span>
									<input type="text" name="updateBy" id="csmc" class="form-control" placeholder="请输入【录入人】信息" aria-describedby="basic-addon1">
								</div>
							</div>
						</div>
						<div class="col-md-1 pd0"></div>
					</div>
				</div>
				<div class="modal-footer mt20">
					<button type="submit" class="btn btn-primary" onclick="addLevel()">
						确定
					</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">
						取消
					</button>
				</div>
			</div>
		</div>
	</div>
	</form>
	</body>